package com.maybach.dubbo.api.service;

import com.maybach.dubbo.api.BizResult;
import com.maybach.dubbo.api.model.EnterpriseCertificateModel;
import com.maybach.dubbo.api.model.PersonCertificateModel;
import com.maybach.dubbo.api.model.ProviderCertificateModel;
import com.maybach.dubbo.api.model.UserInfoModel;

import javax.validation.constraints.NotNull;

/**
 * Created by houenxun on 16/1/26.
 */
public interface ICertificateService {
    /**
     * 申请认证个人信息
     * @param person
     */
    BizResult<Void> applyCertificate(PersonCertificateModel person);

    /**
     * 申请企业认证
     * @param enterprise
     */
    BizResult<Void> applyCertificate(EnterpriseCertificateModel enterprise);

    /**
     * 申请成为供应商
     * @param userId
     * @return
     */
    BizResult<Void> applyProvider(@NotNull Long userId);

    /**
     * 查询个人认证信息
     * @param userId
     * @return
     */
    BizResult<PersonCertificateModel> queryPersonCertificate(Long userId);

    /**
     * 查询企业认证信息
     * @param userId
     * @return
     */
    BizResult<EnterpriseCertificateModel> queryEnterpriseCertificate(Long userId);

    /**
     * 查询供应商认证信息
     * @param userId
     * @return
     */
    BizResult<ProviderCertificateModel> queryProviderCertificate(Long userId);

    /**
     * 查询用户和公司信息
     * @param userId
     * @return
     */
    BizResult<UserInfoModel> queryUserInfoByUserId(Long userId);

}
